<?php
//ajax根据系id返回专业
include_once('../include/top.php');
$pid=$_GET['pid'];
$sql="select * from nettteach_class where majorid=".$pid."";
$result=mysql_query($sql);
?>
<select name="classid" style="width:200px;" >
        <option value="-1" selected="selected">请选择班级</option>
<?php
////循环列出选项
while($rows=mysql_fetch_array($result))
        {$typename = ($rows['name']);
        echo "<option value=".$rows['id'].">".$typename."</option>";   } ?>
</select>